-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JDBC
] Change default Precison
and DisplaySize
for all datetime types.
#185
Conversation
Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
Codecov Report
@@ Coverage Diff @@
## integ-fix-#923 opensearch-project/sql#185 +/- ##
====================================================
- Coverage 98.30% 95.80% -2.51%
Complexity 3518 3518
====================================================
Files 342 352 +10
Lines 8694 9352 +658
Branches 554 673 +119
====================================================
+ Hits 8547 8960 +413
- Misses 142 334 +192
- Partials 5 58 +53
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Precison
and DisplaySize
for TIME
and DATE
types.JDBC
] Change default Precison
and DisplaySize
for TIME
and DATE
types.
I just had a general question. What unit of measurement are |
According to docs:
|
DATE(JDBCType.DATE, Date.class, 24, 24, false), | ||
TIME(JDBCType.TIME, Time.class, 24, 24, false), | ||
DATE(JDBCType.DATE, Date.class, 10, 10, false), | ||
TIME(JDBCType.TIME, Time.class, 8, 8, false), | ||
DATETIME(JDBCType.TIMESTAMP, Timestamp.class, 24, 24, false), | ||
TIMESTAMP(JDBCType.TIMESTAMP, Timestamp.class, 24, 24, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update DATETIME and TIMESTAMP to a precision of 9
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
JDBC
] Change default Precison
and DisplaySize
for TIME
and DATE
types.JDBC
] Change default Precison
and DisplaySize
for all datetime types.
Signed-off-by: Heemin Kim <heemin@amazon.com> Signed-off-by: Heemin Kim <heemin@amazon.com>
Signed-off-by: Yury-Fridlyand yuryf@bitquilltech.com
Description
The proposed fix changes default
Precision
andDisplaySize
configured forTIME
andDATE
types.opensearch-project-sql/sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java
Lines 146 to 147 in 522901d
Precision
is the third arg andDisplaySize
is the fourth arg.opensearch-project-sql/sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java
Lines 65 to 66 in 522901d
Please, note, classes referenced here
^
arejava.sql.*
classes, notjava.time.*
ones.Time
has no fraction seconds part.Test
Before
After
Issues Resolved
opensearch-project/sql-jdbc#21
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.